Made changes to server to allow admin panel to retrieve last activity instead of last logged in date #58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The recent admin panel updates #54 accidentally are grabbing the last logged in date from the server instead of the last activity. This PR aims to fix it.
Here's an image of the live behaviour of the admin panel for a username:
vs after this PR:
As you can see, the "Last played" field now shows a different date. We can look at the db for this username:
As we can see, this is the right and expected result now
Below is an example of a new user who's made an account and logged in, but hasn't played yet. This is the current behaviour:
And here is the new behaviour:
As we can see, the last played field is null because they haven't played yet. This is their db record:
To test this PR, download it and try it out with the admin panel, comparing the values against the db for last activity instead of last logged in date